package com.hgyc.mom.tool.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hgyc.mom.tool.entity.AutoCodeResult;
import com.hgyc.mom.tool.mapper.AutoCodeResultMapper;
import com.hgyc.mom.tool.service.AutoCodeResultService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 编码生成记录Service业务层实现
 *
 * @author fwj
 * @since 2025-05-06
 */
@Slf4j
@Service
public class AutoCodeResultServiceImpl extends ServiceImpl<AutoCodeResultMapper, AutoCodeResult> implements AutoCodeResultService {

    @Override
    public List<AutoCodeResult> getByRuleId(Long ruleId) {
        LambdaQueryWrapper<AutoCodeResult> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(AutoCodeResult::getRuleId, ruleId);
        return list(wrapper);
    }
}